home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Workspace / Locus / Source / Globals.m < prev    next >
Text File  |  1995-06-12  |  3KB  |  133 lines

  1.  
  2. /*
  3.     Copyright 1993  Jeremy Slade.
  4.  
  5.     You are free to use all or any parts of the Locus project
  6.     however you wish, just give credit where credit is due.
  7.     The author (Jeremy Slade) shall not be held responsible
  8.     for any damages that result out of use or misuse of any
  9.     part of this project.
  10.  
  11. */
  12.  
  13. /*
  14.     Project: Locus
  15.  
  16.     File: Globals.m
  17.  
  18.     Description: See Globals.h
  19.  
  20.     Original Author: Jeremy Slade
  21.  
  22.     Revision History:
  23.         Created
  24.             V.101    JGS    Mon Feb  1 22:30:58 GMT-0700 1993
  25.             
  26. */
  27.  
  28. #import "Globals.h"
  29.  
  30. #import "Activator.h"
  31. #import "AppIconView.h"
  32. #import "Inspector.h"
  33.  
  34.  
  35. BOOL isAutoLaunch;
  36.  
  37. BOOL DEBUGGING;
  38.  
  39.  
  40. /*
  41.  * Preferences ------------------------------------------------------
  42.  */
  43.  
  44. BOOL autolaunchHide;
  45. int activatorMask;
  46. BOOL floatActivator;
  47. NXColor activatorFillColor;
  48. NXColor activatorBorderColor;
  49. NXRect defaultViewerFrame;
  50. BOOL verifyActions;
  51. BOOL autoSave;
  52. BOOL activatorAdd;
  53. BOOL appIconAdd;
  54. int inspectorMode;
  55. NXPoint inspectorLocation;
  56. BOOL hideDeactive;
  57. id startupFolders;
  58.  
  59. NXDefaultsVector Defaults = {
  60.     { PREF_ACTIVATOR_MASK, "15" }, // Defaults to all bars on
  61.     { PREF_AUTOLAUNCH_HIDE, "NO" },
  62.     { PREF_ACTIVATOR_FLOAT, "YES" }, // Defaults to floating
  63.     {PREF_ACTIVATOR_COLOR, "1.0 1.0 1.0" }, // White
  64.     {PREF_ACTIVATOR_BORDER, "0.0 0.0 0.0" }, // Black
  65.     { PREF_VIEWER_FRAME, "100 300 250 380" },
  66.     { PREF_VERIFY, "YES" },
  67.     { PREF_AUTOSAVE, "NO" },
  68.     { PREF_ADD_ACTIVATOR, "YES" },
  69.     { PREF_ADD_APPICON, "YES" },
  70.     { PREF_INSPECTORMODE, "None" },
  71.     { PREF_INSPECTORLOCATION, "8 204" },
  72.     { PREF_HIDEDEACTIVE, "YES" },
  73.     { PREF_STARTUPFOLDERS, DEFAULT_FOLDER"."FOLDER_EXT },
  74.     { NULL }
  75. };
  76.  
  77.  
  78. // Valid types for drag in operations
  79. const char *dragInTypes[DRAGINTYPES];
  80.  
  81.  
  82. /*
  83.  * Other Global Variables -------------------------------------------------
  84.  */
  85.  
  86. // The MainController
  87. id mainController = nil;
  88.  
  89. // The FolderController
  90. id folderController = nil;
  91.  
  92. // The Inspector
  93. id inspector = nil;
  94.  
  95. // The Activator
  96. id activator;
  97.  
  98. // The AppIcon View
  99. id appIconView = nil;
  100. unsigned int appIconNum = 0;
  101.  
  102.  
  103.  
  104. void    initGlobals ( void )
  105. {
  106.     // Set dragInTypes
  107.     dragInTypes[0] = NXFilenamePboardType;
  108.     
  109.     // Create the activator
  110.     activator = [[Activator alloc] init];
  111.     [activator setBar:activatorMask on:YES];
  112.     [activator setFloating:floatActivator];
  113.     [activator setColor:activatorFillColor];
  114.     [activator setBorderColor:activatorBorderColor];
  115.     [activator setDelegate:mainController];
  116.     [activator setDraggingEnabled:activatorAdd];
  117.     
  118.     // Set up appIconView
  119.     appIconView = [[AppIconView alloc] init];
  120.     [appIconView attachToIcon:[NXApp appIcon]];
  121.     [appIconView setIcon:"InactiveIcon"];
  122.     [appIconView setDraggingEnabled:appIconAdd];
  123.  
  124.     // Create inspector
  125.     inspector = [[Inspector alloc] init];
  126.  
  127.     return;
  128. }
  129.  
  130.  
  131.  
  132.  
  133.